<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			
			.file-div{
				border: 1px solid #ccc;
				padding: 5px 10px 30px;
			}
			
			.file{
				border: 1px solid #ccc;display: block;
				width: 80px;height: 80px;
			}
			.file img{
				width: 80px;height: 80px;
				display: block;
			}
			
		</style>
		
		<script type="text/javascript"> 
		
    		var excel="http://file-zhihuishu.oss-cn-hangzhou.aliyuncs.com/zhs_yufa_150820/createcourse/course/201702/49913fb494374ed799fd14f16ae3e00b.xlsx"; 
    	</script>  
	</head>
	
	<script src="js/jquery.min.js"></script>
	<body>
		
		
		<div class="file-div">
			<h3>文档预览</h3>
			
			<a href="http://ow365.cn/?i=11707&furl="+excel+"" target="_blank">点我预览</a> 
		</div>
		
		
	</body>
</html>

<script type="text/javascript">

$(function(){
	
	
});

var openOffice = function(url,ext){
    var app_url,temp_url;
    switch (ext) {
        case 'doc':
        case 'docx':
        case 'docm':
        case 'dot':
            app_url ='http://sg1b-word-view.officeapps.live.com/wv/wordviewerframe.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=';
            break;
        case 'ppt':
        case 'pptm':
        case 'pptx':
            app_url ='http://sg1b-powerpoint.officeapps.live.com/p/PowerPointFrame.aspx?PowerPointView=ReadingView&ui=zh-CN&rs=zh-CN&WOPISrc=';
            break;          
        case 'xls':
        case 'xlsb':
        case 'xlsm':
        case 'xlsx':
            app_url = 'http://sg1b-excel.officeapps.live.com/x/_layouts/xlviewerinternal.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=';
            break;
        default:break;
    }
    temp_url = 'http://sg1b-15-view-wopi.wopi.live.net:808/oh/wopi/files/@/wFileId?wFileId=';
    temp_url += encodeURIComponent(url);
    return app_url+encodeURIComponent(temp_url)+'&access_token=1&access_token_ttl=0';
}
</script>
